﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<B10.Models.ForumPost>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%=Html.Encode(Model.Title) %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">

    <script src="../../Scripts/MicrosoftAjax.js" type="text/javascript"></script>

    <script src="../../Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>

    <script src="../../ckeditor/ckeditor.js" type="text/javascript"></script>

    <script src="../../Scripts/ckeditor.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(function() {
            $("#back-button").button();
        });
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="ui-corner-all ui-helper-clearfix alternate-header" id="tabs">
        <div class="ui-widget-header-title">
            Forum
        </div>
    </div>
    <div>
        <div style="margin-bottom: 10px; margin-top: 10px;">
            <a rel="nofollow" id="new-post" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only"
                title="Powrót" href="<%=Url.Action("Index") %>"><span class="ui-button-text">Powrót</span>
            </a>
        </div>
        <div class="clear">
        </div>
    </div>
    <ol id="post-list" class="page-list">
        <% Html.RenderPartial("SinglePost", Model); %>
        <%foreach (var c in Model.ForumPosts)
          { %>
        <%Html.RenderPartial("SinglePost", c); %>
        <%} %>
    </ol>
    <%Html.EnableClientValidation(); %>
    <div class="content-wrapper">
        <%using (Html.BeginForm("Create", "Forum"))
          { %>
        <div id="add-post">
            <input type="hidden" value='<%=Model.Id %>' name="replyId" id="replyId" />
            <div class="editor-label">
                Odpowiedz :
            </div>
            <%if (Request.IsAuthenticated)
              { %>
            <% Html.RenderPartial("NewPostForm", Model); %>
            <%}
              else
              { %>
            Aby pisać na forum musisz się zalogować.
            <%} %>
        </div>
        <%} %>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="LeftColumnContent" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="RightColumnContent" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="RightColumnBottomContent" runat="server">
</asp:Content>
